#include "Cmaid_Gtest.h"

using namespace ::testing;

static Cmaid_Container *
cmaid_skip_list_set_new_1(const void *param)
{
	return cmaid_skip_list_set_new(1, (const Cmaid_Value *)param);
}

static Cmaid_Container *
cmaid_skip_list_set_new_4(const void *param)
{
	return cmaid_skip_list_set_new(4, (const Cmaid_Value *)param);
}

static Cmaid_Container *
cmaid_skip_list_set_new_7(const void *param)
{
	return cmaid_skip_list_set_new(7, (const Cmaid_Value *)param);
}

/*
 * The Set tests
 */
INSTANTIATE_TEST_CASE_P(skip_list_string,
			Cmaid_Set_Gtest,
			Combine(
				Values(&cmaid_skip_list_set_new_1,
					&cmaid_skip_list_set_new_4,
					&cmaid_skip_list_set_new_7),
				CMAID_GTEST_STRING_PARAMS,
				CMAID_GTEST_STRING_VALUES)
		);

INSTANTIATE_TEST_CASE_P(skip_list_integer,
			Cmaid_Set_Gtest,
			Combine(
				Values(&cmaid_skip_list_set_new_1,
					&cmaid_skip_list_set_new_4,
					&cmaid_skip_list_set_new_7),
				CMAID_GTEST_INTEGER_PARAMS,
				CMAID_GTEST_INTEGER_VALUES)
		);
/*
 * The cache tests
 */
#if 0
INSTANTIATE_TEST_CASE_P(skip_list_string,
			Cmaid_Cache_Gtest,
			Combine(
				Values(CMAID_GTEST_CONSTRUCTOR_SINGLE(&cmaid_skip_list_cache_new)),
				CMAID_GTEST_STRING_PARAMS,
				CMAID_GTEST_STRING_VALUES)
		);

INSTANTIATE_TEST_CASE_P(Cmaid_Skip_List_integer,
			Cmaid_Cache_Gtest,
			Combine(
				Values(CMAID_GTEST_CONSTRUCTOR_SINGLE(&cmaid_skip_list_cache_new)),
				Values(cmaid_gtest_integer_param),
				Values(cmaid_gtest_numbers))
		);
#endif

static Cmaid_Container *
cmaid_skip_list_map_new_1(const void *key_value, void *val_value)
{
	return cmaid_skip_list_map_new(1, (const Cmaid_Value *)key_value,
			(const Cmaid_Value *)val_value);
}

static Cmaid_Container *
cmaid_skip_list_map_new_4(const void *key_value, void *val_value)
{
	return cmaid_skip_list_map_new(4, (const Cmaid_Value *)key_value,
			(const Cmaid_Value *)val_value);
}

static Cmaid_Container *
cmaid_skip_list_map_new_7(const void *key_value, void *val_value)
{
	return cmaid_skip_list_map_new(7, (const Cmaid_Value *)key_value,
			(const Cmaid_Value *)val_value);
}

/*
 * The map tests
 */
INSTANTIATE_TEST_CASE_P(Cmaid_Skip_List_string, Cmaid_Map_Gtest, Combine(
			Values(CMAID_GTEST_CONSTRUCTOR_PAIR(
					&cmaid_skip_list_map_new_1),
				CMAID_GTEST_CONSTRUCTOR_PAIR(
					&cmaid_skip_list_map_new_4),
				CMAID_GTEST_CONSTRUCTOR_PAIR(
					&cmaid_skip_list_map_new_7)),
				ValuesIn(cmaid_gtest_string_param_first,
					 cmaid_gtest_string_param_last),
				Values(cmaid_gtest_names),
				ValuesIn(cmaid_gtest_string_param_first,
					 cmaid_gtest_string_param_last),
				Values(cmaid_gtest_first_names)
			)
		);
INSTANTIATE_TEST_CASE_P(Cmaid_Skip_List_integer, Cmaid_Map_Gtest, Combine(
			Values(CMAID_GTEST_CONSTRUCTOR_PAIR(
					&cmaid_skip_list_map_new_1),
				CMAID_GTEST_CONSTRUCTOR_PAIR(
					&cmaid_skip_list_map_new_4),
				CMAID_GTEST_CONSTRUCTOR_PAIR(
					&cmaid_skip_list_map_new_7)),
				Values(cmaid_gtest_integer_param),
				Values(cmaid_gtest_numbers),
				Values(cmaid_gtest_integer_param),
				Values(cmaid_gtest_numbers)
			)
		);
